<?php
	if (isset($_SESSION["user_type"]))
	{
		switch($_SESSION["user_type"])
		{
			case 1:
			{
				$name = $_SESSION["sina_username"];
				$type_img = "/open/img/sina_login_16x16.png";
			}
			break;
			case 2:
			{
				$name = $_SESSION["tencent_username"];
				$type_img = "/open/img/tencent_login_16x16.png";
			}
			break;
			case 3:
			{
				$name = $_SESSION["sohu_username"];
				$type_img = "/open/img/sohu_login_16x16.png";
			}
			break;
			case 4:
			{
				$name = $_SESSION["netease_username"];
				$type_img = "/open/img/netease_login_16x16.png";
			}
			break;
		}
	}
?>
	<div class="header">
		<div class="top">
			<div class="logo_box">
				<ul>
					<li><a style="bottom:2px;"><img src="images/logo.png"></a></li>
					<li><a>安全拼车，合法拼车，拼车520！</a></li>
				</ul>
			</div>
			<div class="">
<?php
	if (isset($name))
	{
?>
				<span>已通过<input type="image" src="<?=$type_img?>" />登录到<?=$name?></span>
<?php
	}
?>
			</div>
			<div class="nav_box">
				<div class="underlinemenu">
					<ul>
						<li><a href="/" class="parent"><span>首页</span></a></li>
						<li><a href="/make_route.php" class="parent"><span>发布路线</span></a></li>
						<li><a href="/search_route.php" class="parent"><span>搜索路线</span></a></li>
<?php
	if (isset($name))
	{
?>
						<li><a href="open/function/clear_session.php" class="parent" style="cursor:pointer;" id="logout"><span>注销</span></a></li>
<?php
	}
	else
	{
?>
						<li><a class="parent" style="cursor:pointer;" id="login"><span>登陆</span></a></li>
<?php
	}
?>
					</ul>
				</div>
			</div>
		</div><!-- end of "top" -->
	</div><!-- end of "header" -->
	
	
	<div class="ad_container">
	</div>